﻿<Window x:Class="MVVM.Northwind.Employee.UI.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
        xmlns:v="clr-namespace:MVVM.Northwind.Employee.View;assembly=MVVM.Northwind.Employee.View"
        Title="MainWindow" Height="375" Width="700">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="MainWindowRsourceDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>        
    </Window.Resources>
    <Grid>
        <StackPanel Orientation="Vertical" DataContext="{Binding}">
            <DockPanel>
                <ItemsControl ItemsSource="{Binding Commands}" ItemTemplate="{StaticResource CommandsTemplate}">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel Orientation="Horizontal"/>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                </ItemsControl>                
            </DockPanel>
            <DockPanel>                                
                <Grid Margin="4">                    
                    <TabControl IsSynchronizedWithCurrentItem="True" 
                                ItemsSource="{Binding WorkSpaces}" 
                                ItemTemplate="{StaticResource ClosableTabItemTemplate}" Margin="4"/>                    
                </Grid>
            </DockPanel>
        </StackPanel>
    </Grid>
</Window>
